From c735556726e75428550a3d28a2cf58e2c8490b7d Mon Sep 17 00:00:00 2001 From: Dawid Rycerz Date: Mon, 21 Jul 2025 21:56:55 +0300 Subject: Initial template --- src/pages/[...blog]/[...page].astro | 52 +++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 src/pages/[...blog]/[...page].astro (limited to 'src/pages/[...blog]/[...page].astro') diff --git a/src/pages/[...blog]/[...page].astro b/src/pages/[...blog]/[...page].astro new file mode 100644 index 0000000..5a6da41 --- /dev/null +++ b/src/pages/[...blog]/[...page].astro @@ -0,0 +1,52 @@ +--- +import type { InferGetStaticPropsType, GetStaticPaths } from 'astro'; + +import Layout from '~/layouts/PageLayout.astro'; +import BlogList from '~/components/blog/List.astro'; +import Headline from '~/components/blog/Headline.astro'; +import Pagination from '~/components/blog/Pagination.astro'; +// import PostTags from "~/components/blog/Tags.astro"; + +import { blogListRobots, getStaticPathsBlogList } from '~/utils/blog'; + +export const prerender = true; + +export const getStaticPaths = (async ({ paginate }) => { + return await getStaticPathsBlogList({ paginate }); +}) satisfies GetStaticPaths; + +type Props = InferGetStaticPropsType; + +const { page } = Astro.props as Props; +const currentPage = page.currentPage ?? 1; + +// const allCategories = await findCategories(); +// const allTags = await findTags(); + +const metadata = { + title: `Blog${currentPage > 1 ? ` — Page ${currentPage}` : ''}`, + robots: { + index: blogListRobots?.index && currentPage === 1, + follow: blogListRobots?.follow, + }, + openGraph: { + type: 'blog', + }, +}; +--- + + +
+ + The Blog + + + + +
+
-- cgit v1.2.3